   1              		.syntax unified
   2              		.cpu cortex-m3
   3              		.fpu softvfp
   4              		.eabi_attribute 20, 1
   5              		.eabi_attribute 21, 1
   6              		.eabi_attribute 23, 3
   7              		.eabi_attribute 24, 1
   8              		.eabi_attribute 25, 1
   9              		.eabi_attribute 26, 1
  10              		.eabi_attribute 30, 4
  11              		.eabi_attribute 34, 1
  12              		.eabi_attribute 18, 4
  13              		.thumb
  14              		.syntax unified
  15              		.file	"beep.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.section	.text.beep_SetType,"ax",%progbits
  20              		.align	1
  21              		.thumb
  22              		.thumb_func
  24              	beep_SetType:
  25              	.LFB4:
  26              		.file 1 "uc_libc_dev/sound/beep/beep.c"
   1:uc_libc_dev/sound/beep/beep.c **** #include "beep.h"
   2:uc_libc_dev/sound/beep/beep.c **** 
   3:uc_libc_dev/sound/beep/beep.c **** 
   4:uc_libc_dev/sound/beep/beep.c **** // |------------------- nBYtes -------------------------| --- interval = 0 (sem repetições) -------
   5:uc_libc_dev/sound/beep/beep.c **** //      tOn1    tOff1   tOn2    tOff2   tOn3    tOff3
   6:uc_libc_dev/sound/beep/beep.c **** // _____########________########________########________
   7:uc_libc_dev/sound/beep/beep.c **** 
   8:uc_libc_dev/sound/beep/beep.c **** // |------------------- nBYtes -------------------------| -- interval > 0 (com repetições continua)
   9:uc_libc_dev/sound/beep/beep.c **** //      tOn1    tOff1   tOn2    tOff2   tOn3    tOff3
  10:uc_libc_dev/sound/beep/beep.c **** // _____########________########________########________ __________________________________________
  11:uc_libc_dev/sound/beep/beep.c **** 
  12:uc_libc_dev/sound/beep/beep.c **** #define nPULSE_BEEPS 3 // Quantidade de beeps emitidos por vez
  13:uc_libc_dev/sound/beep/beep.c **** 
  14:uc_libc_dev/sound/beep/beep.c **** typedef struct {
  15:uc_libc_dev/sound/beep/beep.c **** 	uint tOn; 	// tempo que o beep fique ligado
  16:uc_libc_dev/sound/beep/beep.c **** 	uint tOff; 	// tempo que o beep fique desligado
  17:uc_libc_dev/sound/beep/beep.c **** } tPulseBeep;
  18:uc_libc_dev/sound/beep/beep.c **** 
  19:uc_libc_dev/sound/beep/beep.c **** typedef struct {
  20:uc_libc_dev/sound/beep/beep.c **** 	unsigned power:1;	// Aciona ou não a emissão de beeps
  21:uc_libc_dev/sound/beep/beep.c **** 	uint type;			// Determina o tipo sonoro
  22:uc_libc_dev/sound/beep/beep.c **** 	uint nBeeps;		// Quantos beeps emitidos
  23:uc_libc_dev/sound/beep/beep.c **** 	uint index;			// Indece do beep atual para ser emitido
  24:uc_libc_dev/sound/beep/beep.c **** 	tPulseBeep pulse[nPULSE_BEEPS]; // registra os tempos de on/off dos beeps
  25:uc_libc_dev/sound/beep/beep.c **** 	uint intervalLoad;	// Carregar valor para interval
  26:uc_libc_dev/sound/beep/beep.c **** 	uint interval;		// Tempo entre repetições dos beeps. Valor 0 sem repetições
  27:uc_libc_dev/sound/beep/beep.c **** } tBeep, *pBeep;
  28:uc_libc_dev/sound/beep/beep.c **** static tBeep beep;
  29:uc_libc_dev/sound/beep/beep.c **** 
  30:uc_libc_dev/sound/beep/beep.c **** static void beep_SetType(void);
  31:uc_libc_dev/sound/beep/beep.c **** 
  32:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  33:uc_libc_dev/sound/beep/beep.c **** // Descrição:	Inicializa o gerenciador de beeps
  34:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  35:uc_libc_dev/sound/beep/beep.c **** void beep_Init(void) {
  36:uc_libc_dev/sound/beep/beep.c **** 	beep_SetupPorts();
  37:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF; 	// Mantém desligado e emissão de beeps
  38:uc_libc_dev/sound/beep/beep.c **** }
  39:uc_libc_dev/sound/beep/beep.c **** 
  40:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  41:uc_libc_dev/sound/beep/beep.c **** // Descrição: Liga o beep para emitir um tipo sonoro
  42:uc_libc_dev/sound/beep/beep.c **** // Parametro Type: tipo beep será emitido
  43:uc_libc_dev/sound/beep/beep.c **** //			beepOFF 				Beep desligado
  44:uc_libc_dev/sound/beep/beep.c **** //			beepCONTINUOUS 			Beep ligado direto
  45:uc_libc_dev/sound/beep/beep.c **** //			beepCONTINUOUS_ONOFF 	Emissão de um beep curto em intervalos
  46:uc_libc_dev/sound/beep/beep.c **** //			beep1SHORTBEEP 			Emissão de um beep curto
  47:uc_libc_dev/sound/beep/beep.c **** //			beep3SHORTBEEP 			Emissão de três beeps curtos
  48:uc_libc_dev/sound/beep/beep.c **** //			beepCONTINUOUS_2xONOFF	Emissão de dois beeps curtos em intervalos
  49:uc_libc_dev/sound/beep/beep.c **** //			beep1LONG2SHORTBEEP		Emissão um beep longo e dois beeps curtos
  50:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  51:uc_libc_dev/sound/beep/beep.c **** void beep_Play(uint type) {
  52:uc_libc_dev/sound/beep/beep.c **** 	if (type) {
  53:uc_libc_dev/sound/beep/beep.c **** 		beep.type = type;
  54:uc_libc_dev/sound/beep/beep.c **** 		beep_SetType();
  55:uc_libc_dev/sound/beep/beep.c **** 		beep.power = pdON;
  56:uc_libc_dev/sound/beep/beep.c **** 	} else beep.power = pdOFF;
  57:uc_libc_dev/sound/beep/beep.c **** }
  58:uc_libc_dev/sound/beep/beep.c **** 
  59:uc_libc_dev/sound/beep/beep.c **** // retorna o que está sendo tocado no buzzer
  60:uc_libc_dev/sound/beep/beep.c **** // util caso queira esperar pela emissão completa do tipo de beep e emitir outro tipo
  61:uc_libc_dev/sound/beep/beep.c **** uint beep_Playing (void) {
  62:uc_libc_dev/sound/beep/beep.c **** 	if (beep.power == pdON) return beep.type;
  63:uc_libc_dev/sound/beep/beep.c **** 	else return 0;
  64:uc_libc_dev/sound/beep/beep.c **** }
  65:uc_libc_dev/sound/beep/beep.c **** 
  66:uc_libc_dev/sound/beep/beep.c **** // Para qualquer emissão de som
  67:uc_libc_dev/sound/beep/beep.c **** void beep_Stop(void) {
  68:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF;
  69:uc_libc_dev/sound/beep/beep.c **** }
  70:uc_libc_dev/sound/beep/beep.c **** 
  71:uc_libc_dev/sound/beep/beep.c **** 
  72:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  73:uc_libc_dev/sound/beep/beep.c **** // Descrição:	Ajusta o controlador a emitir o tipo sonoro
  74:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  75:uc_libc_dev/sound/beep/beep.c **** static void beep_SetType(void) {
  27              		.loc 1 75 0
  28              		.cfi_startproc
  29              		@ args = 0, pretend = 0, frame = 0
  30              		@ frame_needed = 0, uses_anonymous_args = 0
  31              		@ link register save eliminated.
  32              	.LVL0:
  76:uc_libc_dev/sound/beep/beep.c **** 	uint x; for(x=0;x<nPULSE_BEEPS;x++) { beep.pulse[x].tOff = 0; beep.pulse[x].tOn = 0;}
  33              		.loc 1 76 0
  34 0000 264B     		ldr	r3, .L14
  35 0002 0022     		movs	r2, #0
  36 0004 5A61     		str	r2, [r3, #20]
  37 0006 1A61     		str	r2, [r3, #16]
  38              	.LVL1:
  39 0008 DA61     		str	r2, [r3, #28]
  40 000a 9A61     		str	r2, [r3, #24]
  41              	.LVL2:
  42 000c 5A62     		str	r2, [r3, #36]
  43 000e 1A62     		str	r2, [r3, #32]
  44              	.LVL3:
  77:uc_libc_dev/sound/beep/beep.c **** 	beep.index = 0;
  45              		.loc 1 77 0
  46 0010 DA60     		str	r2, [r3, #12]
  78:uc_libc_dev/sound/beep/beep.c **** 	beep.interval = 0;
  47              		.loc 1 78 0
  48 0012 DA62     		str	r2, [r3, #44]
  79:uc_libc_dev/sound/beep/beep.c **** 
  80:uc_libc_dev/sound/beep/beep.c **** 	switch(beep.type) {
  49              		.loc 1 80 0
  50 0014 5A68     		ldr	r2, [r3, #4]
  51 0016 023A     		subs	r2, r2, #2
  52 0018 052A     		cmp	r2, #5
  53 001a 3DD8     		bhi	.L1
  54 001c DFE802F0 		tbb	[pc, r2]
  55              	.L4:
  56 0020 13       		.byte	(.L3-.L4)/2
  57 0021 03       		.byte	(.L5-.L4)/2
  58 0022 09       		.byte	(.L6-.L4)/2
  59 0023 1B       		.byte	(.L7-.L4)/2
  60 0024 23       		.byte	(.L8-.L4)/2
  61 0025 2F       		.byte	(.L9-.L4)/2
  62              		.p2align 1
  63              	.L5:
  81:uc_libc_dev/sound/beep/beep.c **** 	case beep1SHORTBEEP:
  82:uc_libc_dev/sound/beep/beep.c ****  		beep.nBeeps = 1; // Emitir 1 beep
  64              		.loc 1 82 0
  65 0026 0122     		movs	r2, #1
  66 0028 9A60     		str	r2, [r3, #8]
  83:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 50; // Primeiro beep 50 ms ligado
  67              		.loc 1 83 0
  68 002a 3222     		movs	r2, #50
  69 002c 1A61     		str	r2, [r3, #16]
  84:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 50; // Primeiro beep 50 ms desligado
  70              		.loc 1 84 0
  71 002e 5A61     		str	r2, [r3, #20]
  72 0030 23E0     		b	.L12
  73              	.L6:
  85:uc_libc_dev/sound/beep/beep.c ****  		beep.intervalLoad = 0; // sem repetições
  86:uc_libc_dev/sound/beep/beep.c **** 		break;
  87:uc_libc_dev/sound/beep/beep.c **** 
  88:uc_libc_dev/sound/beep/beep.c **** 	case beep3SHORTBEEP:
  89:uc_libc_dev/sound/beep/beep.c **** 		beep.nBeeps = 3; // Emitir 3 beeps
  74              		.loc 1 89 0
  75 0032 0322     		movs	r2, #3
  76 0034 9A60     		str	r2, [r3, #8]
  77              	.LVL4:
  90:uc_libc_dev/sound/beep/beep.c **** 		for(x=0;x<3;x++) { beep.pulse[x].tOff = 50; beep.pulse[x].tOn = 50;} // todos os beeps 50ms ligad
  78              		.loc 1 90 0
  79 0036 3222     		movs	r2, #50
  80 0038 5A61     		str	r2, [r3, #20]
  81 003a 1A61     		str	r2, [r3, #16]
  82              	.LVL5:
  83 003c DA61     		str	r2, [r3, #28]
  84 003e 9A61     		str	r2, [r3, #24]
  85              	.LVL6:
  86 0040 5A62     		str	r2, [r3, #36]
  87 0042 1A62     		str	r2, [r3, #32]
  88              	.LVL7:
  89 0044 19E0     		b	.L12
  90              	.L3:
  91:uc_libc_dev/sound/beep/beep.c **** 		beep.intervalLoad = 0; // sem repetições
  92:uc_libc_dev/sound/beep/beep.c **** 		break;
  93:uc_libc_dev/sound/beep/beep.c **** 
  94:uc_libc_dev/sound/beep/beep.c **** 	case beepCONTINUOUS_ONOFF:
  95:uc_libc_dev/sound/beep/beep.c ****  		beep.nBeeps = 1; // Emitir 1 beep
  91              		.loc 1 95 0
  92 0046 0122     		movs	r2, #1
  93 0048 9A60     		str	r2, [r3, #8]
  96:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
  97:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 800; // Primeiro beep 800 ms desligado
  94              		.loc 1 97 0
  95 004a 4FF44871 		mov	r1, #800
  96:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
  96              		.loc 1 96 0
  97 004e 6422     		movs	r2, #100
  98 0050 1A61     		str	r2, [r3, #16]
  99              		.loc 1 97 0
 100 0052 5961     		str	r1, [r3, #20]
 101 0054 1FE0     		b	.L11
 102              	.L7:
  98:uc_libc_dev/sound/beep/beep.c ****  		beep.intervalLoad = 100; // repetir os beeps a cada 100ms
  99:uc_libc_dev/sound/beep/beep.c **** 		break;
 100:uc_libc_dev/sound/beep/beep.c **** 
 101:uc_libc_dev/sound/beep/beep.c **** 	case beepCONTINUOUS_2xONOFF:
 102:uc_libc_dev/sound/beep/beep.c **** 		beep.nBeeps = 2; // Emitir 2 beeps
 103              		.loc 1 102 0
 104 0056 0222     		movs	r2, #2
 105 0058 9A60     		str	r2, [r3, #8]
 103:uc_libc_dev/sound/beep/beep.c **** 		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
 106              		.loc 1 103 0
 107 005a 6422     		movs	r2, #100
 108 005c 1A61     		str	r2, [r3, #16]
 104:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 100; // Primeiro beep 100 ms desligado
 109              		.loc 1 104 0
 110 005e 5A61     		str	r2, [r3, #20]
 105:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOn = 100; // Segundo beep 100 ms ligado
 111              		.loc 1 105 0
 112 0060 9A61     		str	r2, [r3, #24]
 106:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOff = 100; // Segundo beep 100 ms desligado
 113              		.loc 1 106 0
 114 0062 DA61     		str	r2, [r3, #28]
 115 0064 15E0     		b	.L10
 116              	.L8:
 107:uc_libc_dev/sound/beep/beep.c ****  		beep.intervalLoad = 2000; // repetir os beeps a cada 2000ms
 108:uc_libc_dev/sound/beep/beep.c **** 		break;
 109:uc_libc_dev/sound/beep/beep.c **** 
 110:uc_libc_dev/sound/beep/beep.c **** 	case beep1LONG2SHORTBEEP:
 111:uc_libc_dev/sound/beep/beep.c **** 		beep.nBeeps = 3; // Emitir 3 beeps
 117              		.loc 1 111 0
 118 0066 0322     		movs	r2, #3
 119 0068 9A60     		str	r2, [r3, #8]
 112:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
 120              		.loc 1 112 0
 121 006a 6422     		movs	r2, #100
 122 006c 1A61     		str	r2, [r3, #16]
 113:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 100; // Primeiro beep 100 ms desligado
 123              		.loc 1 113 0
 124 006e 5A61     		str	r2, [r3, #20]
 114:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOn = 50; // Segundo beep 50 ms ligado
 125              		.loc 1 114 0
 126 0070 3222     		movs	r2, #50
 127 0072 9A61     		str	r2, [r3, #24]
 115:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOff = 50; // Segundo beep 50 ms desligado
 128              		.loc 1 115 0
 129 0074 DA61     		str	r2, [r3, #28]
 116:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[2].tOn = 50; // Terceiro beep 50 ms ligado
 130              		.loc 1 116 0
 131 0076 1A62     		str	r2, [r3, #32]
 117:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[2].tOff = 50; // Terceiro beep 50 ms desligado
 132              		.loc 1 117 0
 133 0078 5A62     		str	r2, [r3, #36]
 134              	.L12:
 118:uc_libc_dev/sound/beep/beep.c **** 		beep.intervalLoad = 0; // sem repetições
 135              		.loc 1 118 0
 136 007a 0022     		movs	r2, #0
 137 007c 0BE0     		b	.L11
 138              	.L9:
 119:uc_libc_dev/sound/beep/beep.c **** 		break;
 120:uc_libc_dev/sound/beep/beep.c **** 
 121:uc_libc_dev/sound/beep/beep.c **** 	case beepCONTINUOUS_1LONG2SHORTBEEP:
 122:uc_libc_dev/sound/beep/beep.c **** 		beep.nBeeps = 3; // Emitir 3 beeps
 139              		.loc 1 122 0
 140 007e 0322     		movs	r2, #3
 141 0080 9A60     		str	r2, [r3, #8]
 123:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
 142              		.loc 1 123 0
 143 0082 6422     		movs	r2, #100
 144 0084 1A61     		str	r2, [r3, #16]
 124:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 100; // Primeiro beep 100 ms desligado
 145              		.loc 1 124 0
 146 0086 5A61     		str	r2, [r3, #20]
 125:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOn = 50; // Segundo beep 50 ms ligado
 147              		.loc 1 125 0
 148 0088 3222     		movs	r2, #50
 149 008a 9A61     		str	r2, [r3, #24]
 126:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOff = 50; // Segundo beep 50 ms desligado
 150              		.loc 1 126 0
 151 008c DA61     		str	r2, [r3, #28]
 127:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[2].tOn = 50; // Terceiro beep 50 ms ligado
 152              		.loc 1 127 0
 153 008e 1A62     		str	r2, [r3, #32]
 128:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[2].tOff = 50; // Terceiro beep 50 ms desligado
 154              		.loc 1 128 0
 155 0090 5A62     		str	r2, [r3, #36]
 156              	.L10:
 129:uc_libc_dev/sound/beep/beep.c **** 		beep.intervalLoad = 2000; // repetir os beeps a cada 2000ms
 157              		.loc 1 129 0
 158 0092 4FF4FA62 		mov	r2, #2000
 159              	.L11:
 160 0096 9A62     		str	r2, [r3, #40]
 161              	.L1:
 162 0098 7047     		bx	lr
 163              	.L15:
 164 009a 00BF     		.align	2
 165              	.L14:
 166 009c 00000000 		.word	.LANCHOR0
 167              		.cfi_endproc
 168              	.LFE4:
 170              		.section	.text.beep_Init,"ax",%progbits
 171              		.align	1
 172              		.global	beep_Init
 173              		.thumb
 174              		.thumb_func
 176              	beep_Init:
 177              	.LFB0:
  35:uc_libc_dev/sound/beep/beep.c **** 	beep_SetupPorts();
 178              		.loc 1 35 0
 179              		.cfi_startproc
 180              		@ args = 0, pretend = 0, frame = 0
 181              		@ frame_needed = 0, uses_anonymous_args = 0
 182              		@ link register save eliminated.
  36:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF; 	// Mantém desligado e emissão de beeps
 183              		.loc 1 36 0
 184 0000 074A     		ldr	r2, .L17
 185 0002 1368     		ldr	r3, [r2]
 186 0004 43F0C043 		orr	r3, r3, #1610612736
 187 0008 1360     		str	r3, [r2]
 188 000a 064B     		ldr	r3, .L17+4
 189 000c 4FF0C042 		mov	r2, #1610612736
 190 0010 1A60     		str	r2, [r3]
  37:uc_libc_dev/sound/beep/beep.c **** }
 191              		.loc 1 37 0
 192 0012 054B     		ldr	r3, .L17+8
 193 0014 1A78     		ldrb	r2, [r3]	@ zero_extendqisi2
 194 0016 6FF30002 		bfc	r2, #0, #1
 195 001a 1A70     		strb	r2, [r3]
 196 001c 7047     		bx	lr
 197              	.L18:
 198 001e 00BF     		.align	2
 199              	.L17:
 200 0020 00C00920 		.word	537509888
 201 0024 1CC00920 		.word	537509916
 202 0028 00000000 		.word	.LANCHOR0
 203              		.cfi_endproc
 204              	.LFE0:
 206              		.section	.text.beep_Play,"ax",%progbits
 207              		.align	1
 208              		.global	beep_Play
 209              		.thumb
 210              		.thumb_func
 212              	beep_Play:
 213              	.LFB1:
  51:uc_libc_dev/sound/beep/beep.c **** 	if (type) {
 214              		.loc 1 51 0
 215              		.cfi_startproc
 216              		@ args = 0, pretend = 0, frame = 0
 217              		@ frame_needed = 0, uses_anonymous_args = 0
 218              	.LVL8:
 219 0000 10B5     		push	{r4, lr}
 220              	.LCFI0:
 221              		.cfi_def_cfa_offset 8
 222              		.cfi_offset 4, -8
 223              		.cfi_offset 14, -4
 224 0002 074C     		ldr	r4, .L23
  52:uc_libc_dev/sound/beep/beep.c **** 		beep.type = type;
 225              		.loc 1 52 0
 226 0004 30B1     		cbz	r0, .L20
  53:uc_libc_dev/sound/beep/beep.c **** 		beep_SetType();
 227              		.loc 1 53 0
 228 0006 6060     		str	r0, [r4, #4]
  54:uc_libc_dev/sound/beep/beep.c **** 		beep.power = pdON;
 229              		.loc 1 54 0
 230 0008 FFF7FEFF 		bl	beep_SetType
 231              	.LVL9:
  55:uc_libc_dev/sound/beep/beep.c **** 	} else beep.power = pdOFF;
 232              		.loc 1 55 0
 233 000c 2378     		ldrb	r3, [r4]	@ zero_extendqisi2
 234 000e 43F00103 		orr	r3, r3, #1
 235 0012 02E0     		b	.L22
 236              	.LVL10:
 237              	.L20:
  56:uc_libc_dev/sound/beep/beep.c **** }
 238              		.loc 1 56 0
 239 0014 2378     		ldrb	r3, [r4]	@ zero_extendqisi2
 240 0016 60F30003 		bfi	r3, r0, #0, #1
 241              	.LVL11:
 242              	.L22:
 243 001a 2370     		strb	r3, [r4]
 244 001c 10BD     		pop	{r4, pc}
 245              	.L24:
 246 001e 00BF     		.align	2
 247              	.L23:
 248 0020 00000000 		.word	.LANCHOR0
 249              		.cfi_endproc
 250              	.LFE1:
 252              		.section	.text.beep_Playing,"ax",%progbits
 253              		.align	1
 254              		.global	beep_Playing
 255              		.thumb
 256              		.thumb_func
 258              	beep_Playing:
 259              	.LFB2:
  61:uc_libc_dev/sound/beep/beep.c **** 	if (beep.power == pdON) return beep.type;
 260              		.loc 1 61 0
 261              		.cfi_startproc
 262              		@ args = 0, pretend = 0, frame = 0
 263              		@ frame_needed = 0, uses_anonymous_args = 0
 264              		@ link register save eliminated.
  62:uc_libc_dev/sound/beep/beep.c **** 	else return 0;
 265              		.loc 1 62 0
 266 0000 034B     		ldr	r3, .L28
 267 0002 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 268 0004 10F00100 		ands	r0, r0, #1
 269 0008 18BF     		it	ne
 270 000a 5868     		ldrne	r0, [r3, #4]
  64:uc_libc_dev/sound/beep/beep.c **** 
 271              		.loc 1 64 0
 272 000c 7047     		bx	lr
 273              	.L29:
 274 000e 00BF     		.align	2
 275              	.L28:
 276 0010 00000000 		.word	.LANCHOR0
 277              		.cfi_endproc
 278              	.LFE2:
 280              		.section	.text.beep_Stop,"ax",%progbits
 281              		.align	1
 282              		.global	beep_Stop
 283              		.thumb
 284              		.thumb_func
 286              	beep_Stop:
 287              	.LFB3:
  67:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF;
 288              		.loc 1 67 0
 289              		.cfi_startproc
 290              		@ args = 0, pretend = 0, frame = 0
 291              		@ frame_needed = 0, uses_anonymous_args = 0
 292              		@ link register save eliminated.
  68:uc_libc_dev/sound/beep/beep.c **** }
 293              		.loc 1 68 0
 294 0000 024B     		ldr	r3, .L31
 295 0002 1A78     		ldrb	r2, [r3]	@ zero_extendqisi2
 296 0004 6FF30002 		bfc	r2, #0, #1
 297 0008 1A70     		strb	r2, [r3]
 298 000a 7047     		bx	lr
 299              	.L32:
 300              		.align	2
 301              	.L31:
 302 000c 00000000 		.word	.LANCHOR0
 303              		.cfi_endproc
 304              	.LFE3:
 306              		.section	.text.beep_Tick,"ax",%progbits
 307              		.align	1
 308              		.global	beep_Tick
 309              		.thumb
 310              		.thumb_func
 312              	beep_Tick:
 313              	.LFB5:
 130:uc_libc_dev/sound/beep/beep.c **** 		break;
 131:uc_libc_dev/sound/beep/beep.c **** 
 132:uc_libc_dev/sound/beep/beep.c **** 	default: //beepCONTINUOUS
 133:uc_libc_dev/sound/beep/beep.c **** 		break;
 134:uc_libc_dev/sound/beep/beep.c **** 	}
 135:uc_libc_dev/sound/beep/beep.c **** }
 136:uc_libc_dev/sound/beep/beep.c **** 
 137:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
 138:uc_libc_dev/sound/beep/beep.c **** // Descrição:	Evento a ser chamado a cada 1ms para control de emissão sonora
 139:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
 140:uc_libc_dev/sound/beep/beep.c **** //static uint interval = 0;
 141:uc_libc_dev/sound/beep/beep.c **** 
 142:uc_libc_dev/sound/beep/beep.c **** void beep_Tick(void) {
 314              		.loc 1 142 0
 315              		.cfi_startproc
 316              		@ args = 0, pretend = 0, frame = 0
 317              		@ frame_needed = 0, uses_anonymous_args = 0
 143:uc_libc_dev/sound/beep/beep.c **** 	// Se não é para emitir som, vamos desligar o buzzer e sair fora
 144:uc_libc_dev/sound/beep/beep.c **** 	if (beep.power == pdOFF) {
 318              		.loc 1 144 0
 319 0000 1F48     		ldr	r0, .L44
 142:uc_libc_dev/sound/beep/beep.c **** 	// Se não é para emitir som, vamos desligar o buzzer e sair fora
 320              		.loc 1 142 0
 321 0002 10B5     		push	{r4, lr}
 322              	.LCFI1:
 323              		.cfi_def_cfa_offset 8
 324              		.cfi_offset 4, -8
 325              		.cfi_offset 14, -4
 326              		.loc 1 144 0
 327 0004 0278     		ldrb	r2, [r0]	@ zero_extendqisi2
 328 0006 D307     		lsls	r3, r2, #31
 329 0008 03D4     		bmi	.L34
 145:uc_libc_dev/sound/beep/beep.c **** 		beep_BuzzerOFF();
 330              		.loc 1 145 0
 331 000a 4FF0C042 		mov	r2, #1610612736
 332 000e 1D4B     		ldr	r3, .L44+4
 333 0010 05E0     		b	.L42
 334              	.L34:
 146:uc_libc_dev/sound/beep/beep.c **** 		return;
 147:uc_libc_dev/sound/beep/beep.c **** 	}
 148:uc_libc_dev/sound/beep/beep.c **** 
 149:uc_libc_dev/sound/beep/beep.c **** 	// se é o beep acionado direto liga o buzzer e cai fora
 150:uc_libc_dev/sound/beep/beep.c **** 	if (beep.type == beepCONTINUOUS) {
 335              		.loc 1 150 0
 336 0012 4368     		ldr	r3, [r0, #4]
 337 0014 012B     		cmp	r3, #1
 338 0016 04D1     		bne	.L36
 151:uc_libc_dev/sound/beep/beep.c **** 		beep_BuzzerON();
 339              		.loc 1 151 0
 340 0018 1B4B     		ldr	r3, .L44+8
 341 001a 4FF0C042 		mov	r2, #1610612736
 342              	.L42:
 343 001e 1A60     		str	r2, [r3]
 152:uc_libc_dev/sound/beep/beep.c **** 		return;
 344              		.loc 1 152 0
 345 0020 10BD     		pop	{r4, pc}
 346              	.L36:
 153:uc_libc_dev/sound/beep/beep.c **** 	}
 154:uc_libc_dev/sound/beep/beep.c **** 
 155:uc_libc_dev/sound/beep/beep.c **** 	// respeitar o tempo entre emissão de beeps quando for de forma continua
 156:uc_libc_dev/sound/beep/beep.c **** 	if (beep.interval) beep.interval--;
 347              		.loc 1 156 0
 348 0022 C36A     		ldr	r3, [r0, #44]
 349 0024 0BB1     		cbz	r3, .L37
 350              		.loc 1 156 0 is_stmt 0 discriminator 1
 351 0026 013B     		subs	r3, r3, #1
 352 0028 23E0     		b	.L43
 353              	.L37:
 157:uc_libc_dev/sound/beep/beep.c **** 	else {
 158:uc_libc_dev/sound/beep/beep.c **** 		if (beep.pulse[beep.index].tOn) { // Checa se ainda é tempo de ficar ativo o buzzer
 354              		.loc 1 158 0 is_stmt 1
 355 002a C168     		ldr	r1, [r0, #12]
 356 002c 8B1C     		adds	r3, r1, #2
 357 002e 50F83340 		ldr	r4, [r0, r3, lsl #3]
 358 0032 3CB1     		cbz	r4, .L38
 159:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerON(); // Liga o buzzer
 359              		.loc 1 159 0
 360 0034 144A     		ldr	r2, .L44+8
 361 0036 4FF0C041 		mov	r1, #1610612736
 160:uc_libc_dev/sound/beep/beep.c **** 			beep.pulse[beep.index].tOn--; // decrementa o tempo de permanecer ligado
 362              		.loc 1 160 0
 363 003a 013C     		subs	r4, r4, #1
 159:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerON(); // Liga o buzzer
 364              		.loc 1 159 0
 365 003c 1160     		str	r1, [r2]
 366              		.loc 1 160 0
 367 003e 40F83340 		str	r4, [r0, r3, lsl #3]
 368 0042 10BD     		pop	{r4, pc}
 369              	.L38:
 161:uc_libc_dev/sound/beep/beep.c **** 		} else if (beep.pulse[beep.index].tOff) { // Checa se é ainda tempo de ficar desativo o buzzer
 370              		.loc 1 161 0
 371 0044 00EBC303 		add	r3, r0, r3, lsl #3
 372 0048 5C68     		ldr	r4, [r3, #4]
 373 004a 34B1     		cbz	r4, .L39
 162:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerOFF(); // desliga o buzzer
 374              		.loc 1 162 0
 375 004c 0D4A     		ldr	r2, .L44+4
 376 004e 4FF0C041 		mov	r1, #1610612736
 163:uc_libc_dev/sound/beep/beep.c **** 			beep.pulse[beep.index].tOff--; // decrementa o tempo de permanecer desligado
 377              		.loc 1 163 0
 378 0052 013C     		subs	r4, r4, #1
 162:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerOFF(); // desliga o buzzer
 379              		.loc 1 162 0
 380 0054 1160     		str	r1, [r2]
 381              		.loc 1 163 0
 382 0056 5C60     		str	r4, [r3, #4]
 383 0058 10BD     		pop	{r4, pc}
 384              	.L39:
 164:uc_libc_dev/sound/beep/beep.c **** 		// Vamos verificar se fez todos os beeps e se é para tocar de forma continua o não,
 165:uc_libc_dev/sound/beep/beep.c **** 		//	se sim vamos recomeçar, senão para tudo
 166:uc_libc_dev/sound/beep/beep.c **** 		} else {
 167:uc_libc_dev/sound/beep/beep.c **** 			if (beep.index < (beep.nBeeps-1)) // Checa se fez todos os beeps
 385              		.loc 1 167 0
 386 005a 8368     		ldr	r3, [r0, #8]
 387 005c 013B     		subs	r3, r3, #1
 388 005e 9942     		cmp	r1, r3
 389 0060 02D2     		bcs	.L40
 168:uc_libc_dev/sound/beep/beep.c **** 				beep.index++; // vai para o próximo beep
 390              		.loc 1 168 0
 391 0062 0131     		adds	r1, r1, #1
 392 0064 C160     		str	r1, [r0, #12]
 393 0066 10BD     		pop	{r4, pc}
 394              	.L40:
 169:uc_libc_dev/sound/beep/beep.c **** 			else {
 170:uc_libc_dev/sound/beep/beep.c **** 				// se fez todos os beeps vamos checar se tem intervalo entre eles, se tiver vamos reiniciar
 171:uc_libc_dev/sound/beep/beep.c **** 				// senão pata tudo
 172:uc_libc_dev/sound/beep/beep.c **** 				if (beep.intervalLoad) {
 395              		.loc 1 172 0
 396 0068 816A     		ldr	r1, [r0, #40]
 397 006a 21B1     		cbz	r1, .L41
 173:uc_libc_dev/sound/beep/beep.c **** 					beep_SetType(); // reinicia as variáveis
 398              		.loc 1 173 0
 399 006c FFF7FEFF 		bl	beep_SetType
 400              	.LVL12:
 174:uc_libc_dev/sound/beep/beep.c **** 					beep.interval = beep.intervalLoad; // Captura o intervalo
 401              		.loc 1 174 0
 402 0070 836A     		ldr	r3, [r0, #40]
 403              	.L43:
 404 0072 C362     		str	r3, [r0, #44]
 405 0074 10BD     		pop	{r4, pc}
 406              	.L41:
 175:uc_libc_dev/sound/beep/beep.c **** 				} else beep.power = pdOFF; // desliga tudo
 407              		.loc 1 175 0
 408 0076 1346     		mov	r3, r2
 409 0078 61F30003 		bfi	r3, r1, #0, #1
 410 007c 0370     		strb	r3, [r0]
 411 007e 10BD     		pop	{r4, pc}
 412              	.L45:
 413              		.align	2
 414              	.L44:
 415 0080 00000000 		.word	.LANCHOR0
 416 0084 1CC00920 		.word	537509916
 417 0088 18C00920 		.word	537509912
 418              		.cfi_endproc
 419              	.LFE5:
 421              		.section	.bss.beep,"aw",%nobits
 422              		.align	2
 423              		.set	.LANCHOR0,. + 0
 426              	beep:
 427 0000 00000000 		.space	48
 427      00000000 
 427      00000000 
 427      00000000 
 427      00000000 
 428              		.text
 429              	.Letext0:
 430              		.file 2 "uc_libc_dev/_libdef/uc_libdefs.h"
DEFINED SYMBOLS
                            *ABS*:00000000 beep.c
D:\_temp\_windows\ccV8cjnw.s:20     .text.beep_SetType:00000000 $t
D:\_temp\_windows\ccV8cjnw.s:24     .text.beep_SetType:00000000 beep_SetType
D:\_temp\_windows\ccV8cjnw.s:56     .text.beep_SetType:00000020 $d
D:\_temp\_windows\ccV8cjnw.s:62     .text.beep_SetType:00000026 $t
D:\_temp\_windows\ccV8cjnw.s:166    .text.beep_SetType:0000009c $d
D:\_temp\_windows\ccV8cjnw.s:171    .text.beep_Init:00000000 $t
D:\_temp\_windows\ccV8cjnw.s:176    .text.beep_Init:00000000 beep_Init
D:\_temp\_windows\ccV8cjnw.s:200    .text.beep_Init:00000020 $d
D:\_temp\_windows\ccV8cjnw.s:207    .text.beep_Play:00000000 $t
D:\_temp\_windows\ccV8cjnw.s:212    .text.beep_Play:00000000 beep_Play
D:\_temp\_windows\ccV8cjnw.s:248    .text.beep_Play:00000020 $d
D:\_temp\_windows\ccV8cjnw.s:253    .text.beep_Playing:00000000 $t
D:\_temp\_windows\ccV8cjnw.s:258    .text.beep_Playing:00000000 beep_Playing
D:\_temp\_windows\ccV8cjnw.s:276    .text.beep_Playing:00000010 $d
D:\_temp\_windows\ccV8cjnw.s:281    .text.beep_Stop:00000000 $t
D:\_temp\_windows\ccV8cjnw.s:286    .text.beep_Stop:00000000 beep_Stop
D:\_temp\_windows\ccV8cjnw.s:302    .text.beep_Stop:0000000c $d
D:\_temp\_windows\ccV8cjnw.s:307    .text.beep_Tick:00000000 $t
D:\_temp\_windows\ccV8cjnw.s:312    .text.beep_Tick:00000000 beep_Tick
D:\_temp\_windows\ccV8cjnw.s:415    .text.beep_Tick:00000080 $d
D:\_temp\_windows\ccV8cjnw.s:422    .bss.beep:00000000 $d
D:\_temp\_windows\ccV8cjnw.s:426    .bss.beep:00000000 beep
                     .debug_frame:00000010 $d

NO UNDEFINED SYMBOLS
